﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HotelBookingSystem
{
    public abstract class Bookable : ICapType
    {
        static private int nextid = 0;
        protected internal int unitid;
        internal protected int capacity;
        internal protected int[] typeCap;
        internal protected TypeBookable typeBookable;
        internal protected decimal cost;

        public Bookable(int capacity, decimal cost)
        {
            this.capacity = capacity;
            this.cost = cost;
            unitid = nextid++;
            typeCap = new int[3];
            typeCap[0] = capacity / 3;
            typeCap[1] = capacity / 3;
            typeCap[2] = capacity - typeCap[0] - typeCap[1];
        }
        public int[] TypeCap
        {
            get
            {
                 return typeCap;
            }
            set
            {
                 typeCap = value; 
            }
            
        }
    }
   
}
